import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;

public class MyList implements Collection<Integer> {

	private ArrayList<Integer> _values = new ArrayList<Integer>();
	//private LinkedList<Integer> _values = new LinkedList<Integer>();

	@Override
	public boolean add(Integer i) {
		return _values.add(i);
	}

	@Override
	public boolean addAll(Collection c) {
		return _values.addAll(c);
	}

	@Override
	public void clear() {
		_values.clear();

	}

	@Override
	public boolean contains(Object o) {
		return _values.contains(o);
	}

	@Override
	public boolean containsAll(Collection<?> c) {
		return _values.containsAll(c);
	}

	@Override
	public boolean isEmpty() {
		return _values.isEmpty();
	}

	@Override
	public Iterator<Integer> iterator() {
		return new MyIterator(_values);
	}

	@Override
	public boolean remove(Object o) {
		return _values.remove(o);
	}

	@Override
	public boolean removeAll(Collection<?> c) {
		return _values.removeAll(c);
	}

	@Override
	public boolean retainAll(Collection<?> c) {
		return _values.retainAll(c);
	}

	@Override
	public int size() {
		return _values.size();
	}

	@Override
	public Object[] toArray() {
		return _values.toArray();
	}

	@Override
	public <T> T[] toArray(T[] a) {
		return _values.toArray(a);
	}

}
